<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div id="app">
    <cpn></cpn>
    <cpn></cpn>
    <cpn></cpn>
</div>
<!--

&lt;!&ndash; 1. script标签， 类型必须是text/x-template&ndash;&gt;
<script type="text/x-template" id="cpn">
<div>
    <h2>我是标题</h2>
    <p>我是内容</p>
</div>
</script>
-->

<!-- 2. template标签-->
<template id="cpn">
    <div>
        <h2>我是标题11</h2>
        <p>我是内容11</p>
    </div>
</template>

<script src="../../js/vue.js"></script>
<script>
    /* 1. 注册一个全局组件*/
    Vue.component('cpn',{
        template:`#cpn`
    })


    const app = new Vue({
        el: '#app',
        data: {
            message: '你好啊'
        }
    })
</script>

</body>
</html>